<template>
	<view class="container">
		<view class="search-bg">
			<view class="section">
				<input class="input" v-model="keywords" placeholder="请输入关键字">
			</view>
			<view class="line"></view>
			<view class="query" @click="search()">
				查询
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keywords:''
			}
		},
		methods: {
			search(){
				if(this.keywords.length == 0){
					uni.showToast({
						title:'请输入关键字',
						icon:'none'
					});
					return;
				}
				uni.navigateTo({
					url:'/pages/users/ticket/result?keywords='+this.keywords
				})
			}
		}
	}
</script>

<style lang="scss">
	.container{
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		.search-bg{
			width: 90%;
			height:350rpx;
			background-color: #FFFFFF;
			box-shadow: 0px 3px 6px 2px rgba(0, 0, 0, 0.1);
			border-radius: 12rpx;
			margin-top: 200rpx;
			.section{
				padding: 30rpx 30rpx 0rpx 30rpx;
				.input{
					font-size: 30rpx;
					height: 80rpx;
					text-align: center;
				}
			}
			.line{
				height:1rpx;
				background-color: #f1f1f1;
				margin: 0rpx 30rpx;
			}
			.query{
				height: 80rpx;
				background-color: #0093ff;
				margin: 60rpx 30rpx 0rpx 30rpx;
				text-align: center;
				line-height: 80rpx;
				color: white;
				font-size: 28rpx;
				
			}
		}
	}
</style>
